import { makeUUID } from '@/utils'

// 生成从minNum到maxNum的随机数
function randomNum(minNum, maxNum) {
  let ret = 0
  switch (arguments.length) {
    case 1:
      ret = parseInt(Math.random() * minNum + 1, 10)
      break
    case 2:
      ret = parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10)
      break
    default:
      break
  }
  return ret
}

function test() {
  const data = []
  for (let i = 0; i < 10000; i++) {
    data.push({
      ObjectID: makeUUID(),
      Name: 'NULL',
      L: randomNum(0, 10000),
      RFirc: (Math.random() * 123456) / 1000000,
      Q: Math.random() * 3000,
      V: Math.random() * 10,
      H: Math.random() * 3000
    })
  }
  return data
}

const data = test()
export default data
